import 'package:flutter_wan_android/model/article.dart';
import 'package:json_annotation/json_annotation.dart';
  
part 'navi_data.g.dart';


List<NaviData> getNaviDataList(List<dynamic> list){
    List<NaviData> result = [];
    list.forEach((item){
      result.add(NaviData.fromJson(item));
    });
    return result;
  }

@JsonSerializable()
  class NaviData extends Object {

  @JsonKey(name: 'articles')
  List<Article> articles;

  @JsonKey(name: 'cid')
  int cid;

  @JsonKey(name: 'name')
  String name;

  NaviData(this.articles,this.cid,this.name,);

  factory NaviData.fromJson(Map<String, dynamic> srcJson) => _$NaviDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$NaviDataToJson(this);
}


  
